/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Utils;

/**
 *
 * @author gustavokatel
 */
public class Arquivo {
    
    private String filename;
       
    public Arquivo(String uri)
    {
        this.filename = uri;
    }
    
    public static String separator()
    {
        return "/";
    }
    
    public String getExtension()
    {
        return filename.substring(filename.lastIndexOf("."));
    }
    
    public String getName()
    {
        String n = filename.substring(filename.lastIndexOf( Arquivo.separator() ));
        
        n = n.substring(0, n.lastIndexOf("."));
        
        return n;       
    }
    
    public String getPath()
    {
        return filename.substring(0,filename.lastIndexOf(Arquivo.separator()));
    }
    
    
}
